From 69d345b334c7a3fecdb0cd5f440fabd83a755309 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Sat, 18 Feb 2023 15:25:29 +0100
Subject: .

---
 src/routes/[lang=lang]/sections/description.svelte | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 src/routes/[lang=lang]/sections/description.svelte

(limited to 'src/routes/[lang=lang]/sections/description.svelte')

diff --git a/src/routes/[lang=lang]/sections/description.svelte b/src/routes/[lang=lang]/sections/description.svelte
new file mode 100644
index 0000000..79a3939
--- /dev/null
+++ b/src/routes/[lang=lang]/sections/description.svelte
@@ -0,0 +1,26 @@
+<script context="module" lang="ts">
+	export type DescriptionModel = {
+		title: string;
+		content?: any;
+	};
+</script>
+
+<script lang="ts">
+	import { PortableText } from "@portabletext/svelte";
+	export let model: DescriptionModel;
+
+	let visible = true;
+
+	$: if (!model.title) {
+		visible = false;
+	} else {
+		visible = true;
+	}
+</script>
+
+{#if visible}
+	<h3>{model.title}</h3>
+	{#if model.content}
+		<PortableText value={model.content} />
+	{/if}
+{/if}
-- 
cgit v1.3

